package com.shxzz.easy12306.framework.starter.idempotent.core.exception;

import lombok.Data;

/**
 * 消息重复消费异常
 *
 * @author shxzz
 * @create 2024-02-23-19:42
 */
@Data
public class MessageRepeatConsumptionException extends RuntimeException {
    /**
     * 消息是否已消费成功
     */
    private final boolean isMessageConsumed;

    private final String repeatMessageKey;

    public MessageRepeatConsumptionException(boolean isMessageConsumed, String repeatMessageKey) {
        this.isMessageConsumed = isMessageConsumed;
        this.repeatMessageKey = repeatMessageKey;
    }
}
